/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：SysMenuButton.java <br>
 * 创建时间：2013-7-21 下午2:31:30 <br>
 * 所属项目：GmudEX <br>
 * @author 12548 <br>
 */
package lostland.gmud.exv2.ui;

import lostland.gmud.exv2.FontSize;
import lostland.gmud.exv2.Game;
import lostland.gmud.exv2.blgframework.impl.BLGGraphics;
import lostland.gmud.exv2.ui.core.ArrowButton;

/**
 * 类名：SysMenuButton <br>
 * 说明：
 *
 * @author 12548
 */

public class SysMenuButton extends ArrowButton {

	public static final int MARGIN_TOP = 1;
	public static final int MARGIN_LEFT = 1;
	static final int PADDING_LEFT = 11;
	static final int PADDING_TOP = 1;
	static final String S[] = {"设置", "关于", "存档", "结束"};

	public static final int TOP = SysMenuBorder.TOP + MARGIN_TOP;
	public static final int LEFT = SysMenuBorder.LEFT + MARGIN_LEFT;
	public static final int WIDTH = 35;
	public static final int HEIGHT = 14;


	int index;

	public SysMenuButton(int index) {
		super(LEFT, TOP + index * (HEIGHT + MARGIN_TOP), WIDTH, HEIGHT);
		this.index = index;
		this.bordered = false;
		this.padding_top = PADDING_TOP;
	}

	/* （非 Javadoc）
	 * @see lostland.gmud.exv2.GmudWindow#draw()
	 */
	@Override
	public void draw() {
		this.drawBackground();
		BLGGraphics g = (BLGGraphics) Game.getInstance().getGraphics();
		g.drawText(S[index], x + PADDING_LEFT, y + PADDING_TOP, FontSize.FT_12PX);
	}

}
